package com.example.demo.util;

import com.alibaba.fastjson2.JSONObject;
import com.alibaba.fastjson2.TypeReference;

import java.io.File;
import java.nio.charset.StandardCharsets;

/**
 * @author gsq
 * @date 2025/3/7 17:31
 */
public class FileUtil {

    public static void write(String filename, String content) {
        File file = new File(filename);
        cn.hutool.core.io.FileUtil.writeString(content, file, StandardCharsets.UTF_8);
    }

    public static String read(String filename) {
        File file = new File(filename);
        return cn.hutool.core.io.FileUtil.readString(file, StandardCharsets.UTF_8);
    }

}
